package main
import(
	"fmt"
)

//211216划水学go 基本数据类型相互转换
func main(){
	//go不能自动转换必须显式转换

	var i int32 = 100

	var n1 float32 = float32(i)
	var n2 int8 = int8(i)
	var n3 int64 = int64(i)
	fmt.Printf("i=%v n1=%v n2=%v n3=%v \n", i, n1, n2, n3)

	//虽然不报错但是按溢出处理
	var num1 int64 = 999999
	var num2 int8 = int8(num1)
	fmt.Println("num2=", num2)

	


}